package de.slothsoft.android.authenticator;

import java.io.Serializable;

import android.accounts.NetworkErrorException;

public interface Authenticator extends Serializable {

    boolean registerUser(Registration registration) throws NetworkErrorException;

    boolean areCorrectCredentials(User user) throws NetworkErrorException;

    /*
     * 
     */

    public static class User implements Serializable {

	private static final long serialVersionUID = -7881588023792422081L;

	public String id;
	public String password;

	public User(String id, String password) {
	    this.id = id;
	    this.password = password;
	}

    }

    /*
     * 
     */

    public static class Registration extends User {

	private static final long serialVersionUID = 1319614827966177673L;

	public String email;

	public Registration(String id, String password, String email) {
	    super(id, password);
	    this.email = email;
	}

    }

}
